package org.example.dao.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 
 * </p>
 *
 * @author ducai
 * @since 2024-12-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
public class User extends Model<User> {

private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 更新时间
     */
    @TableField("update_time")
    private LocalDateTime updateTime;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 是否删除 0-未删除  1-已删除
     */
    @TableField("is_del")
    private Long isDel;

    /**
     * 删除时间
     */
    @TableField("dele_time")
    private LocalDateTime deleTime;

    /**
     * 用户名
     */
    @TableField("nick_name")
    private String nickName;

    /**
     * 账号
     */
    @TableField("account")
    private String account;

    /**
     * 密码
     */
    @TableField("password")
    private String password;

    /**
     * 手机号
     */
    @TableField("phone")
    private String phone;

    /**
     * 性别
     */
    @TableField("sex")
    private String sex;

    /**
     * 暴露id
     */
    @TableField("uuid")
    private String uuid;

    /**
     * 地址
     */
    @TableField("address")
    private String address;

    /**
     * 权限
     */
    @TableField("auth")
    private Long auth;

    /**
     * 头像
     */
    @TableField("picture")
    private String picture;

    /**
     * 是否超级管理员
     */
    @TableField("is_admin")
    private Integer isAdmin;

    /**
     * 积分
     */
    @TableField("points")
    private Integer points;

    /**
     * 绑定权限
     */
    @TableField("role_uuid")
    private String roleUuid;

    /**
     * 是否禁用  1=激活，2=禁用
     */
    @TableField("disable")
    private Integer disable;


    public static final String ID = "id";

    public static final String UPDATE_TIME = "update_time";

    public static final String CREATE_TIME = "create_time";

    public static final String IS_DEL = "is_del";

    public static final String DELE_TIME = "dele_time";

    public static final String NICK_NAME = "nick_name";

    public static final String ACCOUNT = "account";

    public static final String PASSWORD = "password";

    public static final String PHONE = "phone";

    public static final String SEX = "sex";

    public static final String UUID = "uuid";

    public static final String ADDRESS = "address";

    public static final String AUTH = "auth";

    public static final String PICTURE = "picture";

    public static final String IS_ADMIN = "is_admin";

    public static final String POINTS = "points";

    public static final String ROLE_UUID = "role_uuid";

    public static final String DISABLE = "disable";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
